<?php
/*
 * description：
 * author：wh
 * email：
 * createTime：{2020/1/6} {17:40} 
 */

namespace app\index\controller;




use wanghua\php_date_deal_tool\Date;

class Test extends Base
{

    function index(){


        //dump(date('Y-m', strtotime('+1 month')));


        //dump(Date::addOneMonth());
        //dump(Date::addOneDay());
        //dump(Date::addOneYear());
        //dump(Date::addOneMinute());

        $date = (new Date());
        $date->date_format = 'Y-m-d H:i:s';
        $res = $date->addTime(3, 'day');

        dump($res);

        $res = $date->reduceTime(1, 'hour');

        dump($res);

        $start_time = '2010-05-01 12:30:00';
        $end_time = '2010-10-28 12:30:00';
        $res = $date->timeReduceTime($end_time, $start_time, 'day');

        dump($res);
    }


}